﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

// ceo
namespace ChainofResponsibilityPattern1
{
    class CEOApprover : AbstractApprover
    {
        public override void handle(personRequest personRequest)
        {
            if(personRequest.days >= 7)
            {
                Console.WriteLine($"总经理同意了你{personRequest.days}的假期");
            }

            AbstractApprover next = Next();
            if(next == null)
            {
                return;
            }
            next.handle(personRequest);
        }
    }
}
